package com.common.projectcommonframe.utils;

import android.content.ContentResolver;
import android.net.Uri;



public class ImageUris {

    public static Uri getAssetUri(String filename){
        return  Uri.parse("asset:///"+filename);
    }

    public static Uri getFileUri(String filename){
        return  Uri.parse("file:///"+filename);
    }

    public static Uri getResUri(int resId){
        return Uri.parse("res:///"+resId);
    }

    public static Uri getResUri(String resId){
        return Uri.parse("res:///"+resId);
    }

    //由图片的id号R.drawable得到图片文件的绝对路径
//    Uri uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + getResources().getResourcePackageName(R.mipmap.default_add_img_icon) + "/" + getResources().getResourceTypeName(R.mipmap.default_add_img_icon) + "/" + getResources().getResourceEntryName(R.mipmap.default_add_img_icon));
}
